package com.fastadmin.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xphsc.easyjdbc.annotation.CreatedDate;
import com.xphsc.easyjdbc.annotation.ModifiedDate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;


@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Builder(toBuilder = true)
@Table(name = "t_user")
@Entity
@ApiModel(description = "用户类")
public class User implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "ID", example = "100")
    private Long id;
    @ApiModelProperty(value = "用户名")
    private String username;
    @ApiModelProperty(value = "密码")
    private String password;
    @ApiModelProperty(value = "昵称")
    private String nickname;
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "电话")
    private String phone;
    @ApiModelProperty(value = "城市")
    private String city;
    @ApiModelProperty(value = "城市2")
    private String country;
    @ApiModelProperty(value = "省份")
    private String province;
    @ApiModelProperty(value = "性别")
    private Integer sex;
    @ApiModelProperty(value = "状态" )
    private Integer status;
    @ApiModelProperty(value = "头像")
    private String avatar;
    @ApiModelProperty(value = "威信ID")
    private String open_id;
    @Transient
    private String roles;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp reset_password_time;
    @CreatedDate
    private Date create_time;
    @ModifiedDate
    private Date update_time;


}
